package cc.ucanuup.config.security.token;
import java.util.Collection;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

/**
 * 文件名： com.bozhon.config.sercurity.token.MyUsernamePasswordAuthenticationToken.java
 * 作者：   WenBin
 * 日期：   2018年2月1日
 * 功能说明： 自定义的  验证, 添加二维码的校验  SRM 使用的TOKEN
 *
 * =========================================================
 * 修改记录：
 * 修改作者    日期      修改内容
 * =========================================================
 *  Copyright (c) 2010-2011 .All rights reserved.
 */
public class MyUsernamePasswordAuthenticationToken extends UsernamePasswordAuthenticationToken {

	/**
	 * Description:[字段功能描述]
	 */
	private static final long serialVersionUID = 1L;
	/**供应商编码*/
	private String  spCode;
	/**供应商名称*/
	private String  spName;
	/**供应商ID*/
	private String  spId;
	/**是否指定供应商是否登陆了(admin 页面使用)*/
	private boolean spLogin = false;
	/**用户的ID*/
	private String  userId;
	/**用户的名称*/
	private String  userName;
	/** 登陆页面的 形式  1 为供应商登陆页面 2 为*/
	private String loginPage;

	public MyUsernamePasswordAuthenticationToken(Object principal, Object credentials) {
		super(principal, credentials);
	}

	public MyUsernamePasswordAuthenticationToken(Object principal, Object credentials,
			Collection<? extends GrantedAuthority> authorities) {
		super(principal, credentials, authorities);
	}


	public String getSpCode() {

		return spCode;
	}


	public void setSpCode(String spCode) {

		this.spCode = spCode;
	}


	public String getSpName() {

		return spName;
	}


	public void setSpName(String spName) {

		this.spName = spName;
	}


	public String getSpId() {

		return spId;
	}


	public void setSpId(String spId) {

		this.spId = spId;
	}


	public boolean isSpLogin() {

		return spLogin;
	}


	public void setSpLogin(boolean spLogin) {

		this.spLogin = spLogin;
	}


	public String getUserId() {

		return userId;
	}


	public void setUserId(String userId) {

		this.userId = userId;
	}


	public String getUserName() {

		return userName;
	}

	public void setUserName(String userName) {

		this.userName = userName;
	}


	public String getLoginPage() {

		return loginPage;
	}


	public void setLoginPage(String loginPage) {

		this.loginPage = loginPage;
	}

}